<?php

Class User_activity extends CI_Model {

    var $id_user;
    var $id_activity;

    function __construct() {
        parent::__construct();
    }

    function add_UA($dataUA) {


        $this->db->insert('user_activity', $dataUA);
    }

    function delete_UA($user, $activity) {


        $this->db->delete('user_activity', array('id_user' => $user, 'id_activity' => $activity));
    }

    function get_Activity($user) {
        $query = $this->db->get_where('user_activity', array('id_user' => $user));
        $rows = $query->num_rows();
        $query = $query->result_array();

       
        return $query;
    }

}

?>
